<?php


namespace app\admin\controller;


use app\common\controller\BaseController;
use think\App;

class Upload extends BaseController
{
    public function __construct(App $app)
    {
        parent::__construct($app);
    }

    /**
     * @return array
     * @throws \OSS\Core\OssException
     * 图片上传
     */
    public function index()
    {
        $arr = [
            'code' => 0,
            'msg' => '调用成功',
            'data' => $this->uploadFile()
        ];
        return json($arr);
    }
}